<!-- 主页面 -->
<template>
  <div class="home">
    <navBar class="nav" ></navBar>
    <!-- 动态路由，切换组件(切换子页面) -->
    <router-view v-slot="{ Component }" >
        <component :is="Component" class="content" />
    </router-view>
  </div>
</template>

<script setup>
// 引入导航栏组件
import navBar from "@/components/navBar.vue";
</script>

<style lang="less" scoped>
.nav{
  position: fixed;
  top: 0;
  z-index: 999;
}
// 主页面的尺寸控制
.home {
  min-height: 100vh;
  width: 100%;
  background-color: #fcfcfc;
  align-items: center;
  padding-top: 60px;
  
}
.content {
  
  width: 1200px;
  margin: 0 auto;
  // margin-top: 70px;
  overflow: hidden auto;
  // background-color: #eee;
  // height: 100vh;
  &::-webkit-scrollbar {
    display: none; /* 隐藏滚动条 */
  }
}
</style>